package factorycase.middlefactory;

/**
 * @Description:工厂模式 管理多司机
 * @Author: csh
 * @CreateDate: 2018/8/20$ 15:33$
 * @Version: 1.0
 */
public class Magnate {
    public static void main(String[] args) {
        try {
            //司机
            Driver driver = new BenzDriver();
            //通过司机获取指定的汽车
            Car car = driver.driverCar();
            //驾驶
            car.drive();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
